﻿@using Webdiyer.WebControls.Mvc
@model PagedList<EAM.Model.AssetManager>
@{
    ViewBag.Title = "Index";

    var brandInfoDict = (Dictionary<int, string>)ViewData["brandInfoDict"];
}
@if (false)
{
    <script src="../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
}


<div style="padding: 0px 10px;">
    <div style="padding-bottom: 5px;">
        <input type="button" onclick="history.go(-1)" value="返回资产汇总" class="btn_green" />
    </div>

    <table class="tb" width="98%" style="text-align: center;">
        <tr>
            <th valign="top">序号</th>
            <th>名称</th>
            <th>标签</th>
            <th>状态</th>
            <th>供应商</th>
            <th>供应商联系人</th>
            <th>保修时间</th>
            <th>保管人</th>
            <th>使用人</th>
            <th>所在部门</th>
        </tr>
        @foreach (var m in Model)
        {
            <tr>
                <td>@m.AssetID</td>
                <td>@m.AssetName</td>
                <td>@m.AssetLabel</td>
                <td>@( ((Dictionary<int, string>)ViewData["statusDict"])[(m.AssetStatus ?? -1)]) </td>
                <td>@( ((Dictionary<int, string>)ViewData["supplyDict"])[(m.AssetSupply ?? -1)]) </td>
                <td>@brandInfoDict[(m.AssetSupply ?? -1)] </td>
                <td>@m.AssetWarrantLastTime</td>
                <td>@( ((Dictionary<Guid, string>)ViewData["AssetCustodyMemberIDDict"])[(m.AssetCustodyMemberID ?? new Guid())])</td>
                <td>@( ((Dictionary<Guid, string>)ViewData["AssetCustodyMemberIDDict"])[(m.AssetUsedMemberID ?? new Guid())])</td>
                <td>@( ((Dictionary<int, string>)ViewData["AssetDepartIDDict"])[(m.AssetDepartID ?? -1)])</td>
            </tr>
        }
        <tr>
            <td colspan="11" style="text-align: left;">

                 <div style="float: right;">
                    @Html.Pager(Model)
                </div>
            </td>
        </tr>
    </table>
</div>

